package com.neuedu.corejava.ch10.homework;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class storage {
	
	public static void main(String[] args) {
		 
		 List<String> list =new ArrayList<String>();
		 list.add("apple");
		 list.add("grape");
		 list.add("banana");
		 list.add("pear");
		 
		 System.out.println("最大的元素为"+Collections.max(list));
		 System.out.println("最小的元素为"+Collections.min(list));
		 
		 Collections.sort(list);
		 for (String s : list) {
			 System.out.println(s);
			
		}
		 

		
		 
	}

}
